package com.amado.course34Thread;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by Administrator on 2018/7/17.
 */
public class S09TimeTaskTest {
    public static void main(String[] args) {
        Timer timer = new Timer();
        //2000毫秒后第一次运行TimerTask,每间隔300毫秒运行一次TimerTask
        timer.schedule(new TimerTask() {
        	 @Override
             public void run() {
                 System.out.println("abc");
             }
        }, 2000 , 300);
    }
}
